<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>类型管理</title>
    <script src="__STATIC__/Js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC__/hdjs/hdjs.css"/>
    <script src="__STATIC__/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
    <style type="text/css">
        .plus_minus{
            width: 20px;
        }
        table .hd-btn{
        	margin: 0;
        }
        table tr a:hover{
        	text-decoration: none;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap.min.css"/>
</head>
<body>
<div class="wrap">
    <table class="hd-table hd-table-list">
        <thead>
        <tr>
            <td>类型id</td>
            <td>类型名称</td>
            <td width="200">操作</td>
        </tr>
        </thead>
        <tbody>
        	<foreach from="$data" key="$k" value="$v">
	        	<tr>
		            <td width="100">{$v.tid}</td>
		            <td>{$v.tname}</td>
		            <td width="300">
		            	<a href="{|U:'Attr/add',array('tid'=>$v['tid'])}" class="hd-btn hd-btn-success hd-btn-xm">添加属性</a>
						<a href="{|U:'Attr/index',array('tid'=>$v['tid'])}" class="hd-btn hd-btn-success hd-btn-xm">属性列表</a>
						<a href="{|U:'edit',array('tid'=>$v['tid'])}" class="hd-btn hd-btn-primary hd-btn-xm">修改类型</a>
						<a href="javascript:hd_modal_del({$v.tid});" class="hd-btn hd-btn-danger hd-btn-xm">删除类型</a>
		            </td>
	        	</tr>
        	</foreach>
        </tbody>
    </table>
    <div class="page_hdjob">
        
    </div>
</div>

</body>
<script type="text/javascript">
	function hd_modal_del(id) {
        hd_modal({
            width: 400,//宽度
            height: 150,//高度
            title: '确认删除吗？',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: false,//背景遮罩
            shadeOpacity: 0.4,//背景透明度
            success: function () {//点击确定后的事件
				location.href = "__CONTROLLER__" + '&a=del&tid=' + id;
            },
            cancel: function () {//点击关闭后的事件
				
            }
        });
    }
</script>
</html>











